import 'package:github_client_app/index.dart';

class ThemeChangeRoute extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(GmLocalizations.of(context).theme),
      ),
      body: ListView(
        children: Global.themes.map<Widget>((theme) {
          return GestureDetector(
            child: Padding(
              padding: EdgeInsets.symmetric(vertical: 5, horizontal: 16),
              child: Container(
                color: theme,
                height: 40,
              ),
            ),
            onTap: () => Provider.of<ThemeModel>(context).theme = theme,
          );
        }).toList(),
      ),
    );
  }
//  @override
//  _ThemeChangeRouteState createState() => _ThemeChangeRouteState();
}

//class _ThemeChangeRouteState extends State<ThemeChangeRoute> {
//  @override
//  Widget build(BuildContext context) {
//    return null;
//  }
//}
